/*
 * @Author: 刘鑫
 * @Date: 2020-11-20 18:35:06
 * @LastEditors: 刘鑫
 * @LastEditTime: 2020-11-20 18:35:12
 * @Description:
 */
import { request } from 'umi';
//购物车接口
export let getlist = () => {
  return request('/cart/index', {
    method: 'GET',
  });
};
export let check = (data: any) => {
  return request('/cart/checked', {
    method: 'POST',
    data,
  });
};
//删除
export let deleteCart = (data: any) => {
  return request('/cart/delete', {
    method: 'POST',
    data,
  });
};
//购物车商品数量
export let getCount = () => {
  return request('/cart/goodscount', {
    method: 'GET',
  });
};
//获取商品详情
export let getDetail = (params: any) => {
  return request('/goods/detail', {
    method: 'GET',
    params: params,
  });
};
